﻿/***********************************************************************
 * <copyright file="IUser.cs" company="B/S JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Saturday, March 29, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using BusinessSecurity;

namespace DataSecurity.StandartInterfaces
{
    /// <summary>
    /// Defines methods to access User
    /// </summary>
    /// <remarks>
    /// This is a database-independent interface. Implementations are database specific
    /// </remarks>
    public interface IUser
    {
        /// <summary>
        /// Gets the user.
        /// </summary>
        /// <param name="id">The identifier.</param>
        /// <returns></returns>
        User GetUser(int id);

        /// <summary>
        /// Gets the user.
        /// </summary>
        /// <param name="email">The email.</param>
        /// <returns></returns>
        List<User> GetUser(string email);

        /// <summary>
        /// Gets the users.
        /// </summary>
        /// <returns></returns>
        List<User> GetUsers();

        /// <summary>
        /// Gets the paged.
        /// </summary>
        /// <param name="currentPage">The current page.</param>
        /// <param name="totalPage">The total page.</param>
        /// <returns></returns>
        List<User> GetPaged(int currentPage, ref int totalPage);
        
        /// <summary>
        /// Inserts the user.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        object InsertUser(User user);

        /// <summary>
        /// Updates the user.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        object UpdateUser(User user);

        /// <summary>
        /// Changes the user profile.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        object ChangeUserProfile(User user);
        
        /// <summary>
        /// Deletes the user.
        /// </summary>
        /// <param name="user">The user.</param>
        /// <returns></returns>
        object DeleteUser(User user);
    }
}
